Skip to content

refactor(plugin-grid): retire the redundant ObjectGridColumnHolds.headerIcon hold - #6686

Merged
os-sales merged 2 commits into
mainfrom
claude/issue-6424-plugin-grid-remainder
Aug 28, 2026
Merged

refactor(plugin-grid): retire the redundant ObjectGridColumnHolds.headerIcon hold#6686
os-sales merged 2 commits into
mainfrom
claude/issue-6424-plugin-grid-remainder

Conversation

@os-sales

Copy link
Copy Markdown
Collaborator

Part of #6424

⚠️ Part of, not the closing keyword, and that is a deliberate deviation from the dispatch order. The order asked for the closing keyword on this card, on the premise that all three items would land. (That keyword is deliberately not spelled next to the card number anywhere in this body: GitHub's parser matches it regardless of any negation around it, and this card must stay open.) Item 1 did not land — its precondition is measurably absent on this ref (evidence below). Closing the card would bury an unfinished, already-ruled item, and the inbox filter only reads open cards. The card stays open for item 1.

Two of the three ruled items land here, both measured rather than inherited.


Item 1 — the emit-side fitContent cast: STOPPED, with evidence

The line, located on my own ref

Both numbers in circulation are stale. Measured at base 9d86e1d79:

source line
the 2026-08-28 ruling :3418 — stale
this seat's ACCEPT, measured earlier today :3587 — stale
measured here :3606if ((col as any).fitContent) continue;

Three independent measurements say do not remove it yet.

1a. The ruling's precondition is not met — PR #6673 has not merged

The ruling ties this cast to the fitContent declaration: it "travels with this verdict". That declaration is still in flight — PR #6673 is state=open, merged=false.

Measured on my ref, each zero with a positive control in the same query shape:

probe result control
fitContent in packages/types/src/data-display.ts 0 headerIcon → 2
fitContent in packages/types/dist/data-display.d.ts (the artefact plugin-grid actually resolves) 0 headerIcon → 2
'fitContent' in keyof TableColumn, compile-time false 'width' → true; 'zzNotAKeyZZ' → false

1b. The cast is a no-op, but NOT for the reason the ruling assumed

Read via the TypeScript checker at the site, cast stripped:

line 3606  expr=`(col as any).fitContent`
   type of `col` (cast stripped) = any   isAny=true

applyColumnChrome = (col: any) => makes orderedColumns an any[], and the loop adds a second as any[]. So the cast never compensated for the undeclared key — it compensates for nothing. This is exactly the lesson PR #6673 measured on data-table.tsx ("cast count is not the instrument, the normalization is"), reproduced on the emit side. Removing it buys zero type safety, now or after #6673 lands.

1c. It is load-bearing as another guard's only real-file control

columnReadBoundary-6458.test.ts uses this exact cast as its Anti-vacuity control 3, and its own comment says: "If that read is ever retired too, this control must be re-pointed at another real cast — never deleted, and never re-pointed back inside the region."

Measured with the test's own scanner regex over the whole file: (col as any).fitContent at :3606 is the only (col as ...) cast read in ObjectGrid.tsx. There is no other candidate to re-point at.

Observed, not predicted — ablation with the mutation proven on disk and restoration observed:

anchored BEFORE: '(col as any).fitContent'=1     blob 0905b2cc
anchored AFTER:  '(col as any).fitContent'=0     blob e19e6a6e   MUTATION PROVEN ON DISK
 FAIL  columnReadBoundary-6458.test.ts > the scanner finds a cast read in the REAL file, outside the guarded region
 AssertionError: expected [] to include 'fitContent'
 Test Files  1 failed (1) | Tests  1 failed | 7 passed (8)
restore: git diff HEAD empty, blob back to 0905b2cc

Baseline on the clean tree for comparison: Test Files 1 passed (1), Tests 8 passed (8), EXIT=0.

⇒ Removing the cast today costs a live guard its only real-file anti-vacuity control and buys nothing. This needs the seat, not me — it is a re-point decision plus an ordering question against #6673.


Item 2 — ObjectGridColumnHolds.headerIcon removed. MEASURED, not inherited

The order was explicit that the previous round's type-algebra derivation must not be carried forward. It was not. The probe confirms the derivation — the ruling stands.

The ruled probe

Run through the same program the test project uses (tsconfig.test.json, paths: {}, so @object-ui/types resolves through the built .d.ts):

probe result
Equal of ObjectGridColumn['headerIcon'] and TableColumn['headerIcon'] true
Equal of ObjectGridColumnDraft['headerIcon'] and TableColumn['headerIcon'] true
instrument control, must be false: Equal of ObjectGridColumn['headerIcon'] and TableColumn['width'] false
instrument control, must be true: Equal of TableColumn['headerIcon'] with itself true

The two controls are the point: a probe that can only answer true measures nothing.

The emit-type ablation — the claim that had never been observed

The actual claim is "the emit types are unchanged with the member absent". Instrument: the TypeScript checker resolves both emit types and prints every member with its resolved type, sorted, to JSON — a structural snapshot, not a derivation. Each leg proves its mutation on disk (anchored grep counts plus a moved blob hash) and its restoration by observation (git diff HEAD empty, hash back), under a trap ... EXIT INT TERM with absolute paths, restoring via an explicit git checkout HEAD -- absolute-path.

leg emit-type members snapshot vs baseline
baseline (clean tree) ObjectGridColumn 27, ObjectGridColumnDraft 27
positive control: delete pinned instead 26 / 26, pinned gone from both DIFFERENT
the ruled claim: delete headerIcon 27 / 27 IDENTICAL

The positive control is what makes the identical result a measurement: the instrument demonstrably detects a holds-member removal that matters. The landed change re-snapshots to IDENTICAL against the pre-edit baseline.

The three facts, re-confirmed with controls rather than quoted

fact measured control (same query shape)
headerIcon is in keyof TableColumn (since #6615) true 'width' → true; 'zzNotAKeyZZ' → false
headerIcon is not a ListColumn member false (not a member) 'width' in keyof ListColumntrue
⇒ so never in the derived RetiredListColumnKey band false (not in band) 'wrap' in the band → true
no second road: ObjectGrid writes it at 3 sites, all under schema.showColumnTypeIcons via getTypeIcon :2129, :2221, :2271
data-table reads it at 1 render site, forwarded verbatim into a span, never re-expressed data-table.tsx:1955-1956

Note on the read count: the card body says "2 reads", the ACCEPT says "1". Both are right at different granularities — 1 render site, 2 syntactic col.headerIcon occurrences (a guard and the render). Stated precisely here so the next reader does not have to re-derive it.

The pinned contrast, stated explicitly — and untouched

pinned stays load-bearing on both counts, which is exactly what makes headerIcon's removal safe and pinned's unsafe:

headerIcon pinned
declared by TableColumn? yes (#6615) no — measured false
in the derived band? no — because it is not a ListColumn member no — because the Exclude carves it out; it is a ListColumn member (control: true)
⇒ only declaration on the emit types? no, TableColumn carries it yes, the holds member
second road to a consumer? no — forwarded verbatim yes — this file's reorder pass re-expresses it as the sticky className
ablation emit types unchanged (27) emit types change (26, key gone)

Two different routes to the same "not in the band", and they must not be conflated — that conflation is how a measurement blurs the two keys. pinned is untouched by this PR.

⚠️ The removal MOVES a liveness claim rather than deleting one

While the hold existed, the emit types declared headerIcon on their own account. They now get it from TableColumn alone, so reverting #6615 would drop it from both emit types in silence while ObjectGrid goes on writing it at three sites. That is a new exposure created by this change, and the new pin's first assertion covers it — it is the guard the deleted member used to provide implicitly.

The pin is not vacuous. Simulating that revert turns it red, mutation proven on disk and restoration observed:

src/__tests__/columnHoldsExpiry-6424.test.ts(65,29): error TS2344: Type 'false' does not satisfy the constraint 'true'.
tsc EXIT=2      restore: git diff HEAD empty, blob back to eebaadd3

And the pin really is compiled — tsc -p tsconfig.test.json --listFiles: columnHoldsExpiry-6424.test.ts1 (control: columnEmitBoundary-6004.test.ts → 1; negative control zzNoSuchFile → 0). Green from a file the compiler never read would be worth nothing.


Item 3 — the docblock's general claim, corrected

The claim that the held keys are "undeclared by TableColumn" is false as written since #6615. PR #6651 corrected only the one sentence it was already editing; this PR owns the rest:

  • ObjectGrid.tsx verdict blockheaderIcon moves from HELD to DECLARED, with the expiry and the measurement that retired the hold recorded.
  • ObjectGridColumnHolds docblock — names "undeclared by TableColumn" as the interface's entry condition, flags that it is a claim about another package that can lapse with nothing going red, and states the rule: re-check per key when the owning card closes, never inherit. Plus the ⛔ that a key whose only declaration is this interface is not in that position.
  • the pinned member doc — now records both counts that make it load-bearing, and the 27→26 measurement.
  • columnEmitBoundary-6004.test.ts — its docblock still said the interface declares two keys and its test title said "the two held keys". Both false after this change; corrected, and the routes are now pinned in the new file rather than described in prose.

Gate verdicts — each exit code captured before any pipe, each quoting the gate's own line

Union re-run after the final commit, at 83ad9ffec:

gate exit its own verdict line
plugin-grid type-check (tsc --noEmit && tsc -p tsconfig.test.json) 0 no error TS lines; script name echoed, so not a zero-match no-op
vitest run packages/plugin-grid 0 Test Files 97 passed (97) · Tests 890 passed (890)
check-changeset-presence 0 ✅ 3 source file(s) of 1 released package(s) changed, and this change declares 1 changeset(s)
check-changeset-no-major 0 ✅ No changeset declares a major bump.
check:control-bytes 0 ✅ check-control-bytes: OK (scanned 5527 tracked text file(s); skipped 85 binary).
plugin-grid lint 0 ✖ 676 problems (0 errors, 676 warnings) — all pre-existing
check:published-dist 0 ✅ No published package's build output carries tooling material.
check:phantom-deps 0 ✅ Every in-scope import is declared by the package that publishes it.
check:vi-mock-specifiers 0 ✅ check-vi-mock-specifiers: OK (3896 tracked source file(s) ...)
check:spec-symbols 0 ✅ spec symbol derivation: 1316 files scanned against 4959 spec export names

Declared narrowing on lint

Repo-wide pnpm lint is turbo run lint across 40 packages; I ran the one package this diff touches. Three pieces of evidence, not two:

  1. Population read from eslint's own config, not my guess: eslint itself selected 134 files for packages/plugin-grid.
  2. Count from --format json: 134 files; my three changed files at 0 errors (ObjectGrid.tsx 214 warnings, all pre-existing; the two test files 1 and 0).
  3. Configuration invariance: eslint.config.js has no projectService / parserOptions / project: — grep exit 1, no matches — so type-aware linting is off and this diff cannot move the verdict of any file it does not touch.

⚠️ One honest note: adding --no-inline-config (an objectstack recipe, not this repo's) surfaces 3 errors — in demo/main.tsx, predicate-surface-parity.test.tsx and BulkActionDialog.tsx, none of them in this diff. This repo's lint script is eslint . without that flag, which is what CI runs and what returned 0.

Changeset

Empty frontmatter — the gate's own explicit exemption, quoted from its help text: "If this change really should release nothing, say so — that is a pass, not a workaround." Justified by measurement, not assertion: ObjectGridColumnHolds is not part of the package entry's exported surface — 0 occurrences in the built packages/plugin-grid/dist/index.d.ts (positive control: ObjectGridColumnState, which the entry does re-export, → 1), and headerIcon → 0 there too. Runtime behaviour is untouched; this is types, comments and tests.


Scope

packages/types, packages/components/src/renderers/complex/data-table.tsx, app-shell, i18n, sdui-parser, plugin-list and @objectstack/spec are all untouched — git diff --name-only is exactly the three packages/plugin-grid files plus the changeset.

Generated by Claude Code


Generated by Claude Code

claude added 2 commits August 28, 2026 14:07
…derIcon hold

`ObjectGridColumnHolds` exists for keys `data-table` reads that `TableColumn`
does not declare. `headerIcon` stopped meeting that entry condition when
objectui#6615 declared it on `TableColumn`, and nothing went red at the moment
of loss — the same silent expiry recorded for `options`.

Measured rather than derived (the previous round could only derive it, because
the file was fenced behind another claim):

  - `Equal<ObjectGridColumn['headerIcon'], TableColumn['headerIcon']>` is `true`,
    and so is the `ObjectGridColumnDraft` form. Instrument controls in the same
    shape answer `false`/`true` as expected, so the probe has resolution.
  - Ablation on the resolved emit types (every member's type printed via the
    TypeScript checker, through the same program the test project uses): with
    the member deleted both types are byte-identical at 27 members. Positive
    control — deleting `pinned` instead takes them to 26, `pinned` gone.
  - `headerIcon` is not a `ListColumn` member (control: `width` is), so it was
    never in the derived `RetiredListColumnKey` band (control: `wrap` is).

`pinned` is untouched and stays load-bearing on both counts: `TableColumn` does
not declare it and the band carves it out, so the hold is its only declaration
on the emit types, and this file's reorder pass re-expresses it as the sticky
`className` `data-table` actually reads.

Removing the hold moves a liveness claim rather than deleting one: the emit
types now get `headerIcon` from `TableColumn` alone. `columnHoldsExpiry-6424`
pins that dependency, so reverting the declaration is loud instead of silent.

Also corrects the docblock's general claim that the held keys are "undeclared
by `TableColumn`", false as written since #6615, in the places #6651 left
alone — including the emit-boundary pin that still said the interface declares
two keys.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRJge11jso9TpXRWFt1Z49
…nothing

`ObjectGridColumnHolds` is not part of the package entry's exported surface
(measured: 0 occurrences in `dist/index.d.ts`, control `ObjectGridColumnState` 1),
and the two emit types are byte-identical without the member, so nothing published
moves. Empty frontmatter is the gate's own explicit exemption for that case.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CRJge11jso9TpXRWFt1Z49
@github-actions

Copy link
Copy Markdown
Contributor

✅ Console Performance Budget

Metric Value Budget
Eager closure (gzip, 52 chunks) 3236.9 KB 3266.6 KB
Main entry chunk (gzip) 157.3 KB 350 KB
Entry file index-Dz3m13RI.js
Status PASS

The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it.


📦 Bundle Size Report

Package Size Gzipped
app-shell (consoleActionDispatch.js) 0.20KB 0.19KB
app-shell (index.js) 11.89KB 4.50KB
app-shell (runtime-config.js) 20.61KB 7.35KB
app-shell (types.js) 0.01KB 0.04KB
app-shell (urlParams.js) 10.06KB 3.86KB
auth (ActiveOrganizationStorage.js) 25.05KB 9.16KB
auth (AuthContext.js) 0.31KB 0.24KB
auth (AuthGuard.js) 2.07KB 1.00KB
auth (AuthProvider.js) 40.18KB 10.59KB
auth (AuthShell.js) 3.49KB 1.40KB
auth (ForgotPasswordForm.js) 12.21KB 3.45KB
auth (LoginForm.js) 18.15KB 5.39KB
auth (PreviewBanner.js) 0.90KB 0.50KB
auth (RegisterForm.js) 6.65KB 2.22KB
auth (SocialSignInButtons.js) 9.61KB 3.89KB
auth (UserMenu.js) 3.41KB 1.23KB
auth (auth-gate-events.js) 1.29KB 0.66KB
auth (authStyles.js) 5.04KB 1.72KB
auth (createAuthClient.js) 40.21KB 10.80KB
auth (createAuthenticatedFetch.js) 8.46KB 3.43KB
auth (index.js) 3.19KB 1.44KB
auth (invitation-status.js) 1.22KB 0.70KB
auth (org-roles.js) 6.66KB 2.78KB
auth (phone-identifier.js) 1.11KB 0.66KB
auth (types.js) 0.59KB 0.35KB
auth (useAuth.js) 5.30KB 1.02KB
auth (useWorkspaceAdminStatus.js) 5.13KB 2.35KB
collaboration (CommentThread.js) 26.08KB 7.56KB
collaboration (LiveCursors.js) 3.17KB 1.27KB
collaboration (PresenceAvatars.js) 6.49KB 2.64KB
collaboration (PresenceProvider.js) 2.79KB 1.13KB
collaboration (index.js) 1.68KB 0.73KB
collaboration (useCollaborationTranslation.js) 6.05KB 2.52KB
collaboration (useCommentSearch.js) 1.98KB 0.88KB
collaboration (useConflictResolution.js) 7.75KB 1.86KB
collaboration (useMentionNotifications.js) 1.81KB 0.68KB
collaboration (usePresence.js) 6.33KB 1.84KB
collaboration (useRealtimeSubscription.js) 7.91KB 2.01KB
components (index.js) 509.24KB 115.61KB
core (index.js) 5.30KB 2.13KB
create-plugin (index.js) 10.08KB 3.26KB
data-objectstack (index.js) 173.10KB 47.96KB
fields (index.js) 239.05KB 60.06KB
i18n (LocalizationContext.js) 1.76KB 0.96KB
i18n (currency.js) 1.22KB 0.64KB
i18n (fallbackInterpolation.js) 6.25KB 2.77KB
i18n (i18n.js) 4.28KB 1.75KB
i18n (index.js) 3.44KB 1.39KB
i18n (pickLocalized.js) 7.62KB 3.26KB
i18n (provider.js) 26.89KB 9.04KB
i18n (useDisplayLocale.js) 2.85KB 1.45KB
i18n (useObjectLabel.js) 33.40KB 8.71KB
i18n (useSafeTranslation.js) 5.60KB 2.33KB
layout (index.js) 38.95KB 10.97KB
mobile (MobileProvider.js) 0.92KB 0.49KB
mobile (ResponsiveContainer.js) 0.94KB 0.38KB
mobile (breakpoints.js) 1.51KB 0.70KB
mobile (createOfflineDataSource.js) 5.61KB 1.75KB
mobile (index.js) 1.55KB 0.62KB
mobile (offlineQueue.js) 3.91KB 1.35KB
mobile (pwa.js) 0.97KB 0.49KB
mobile (serviceWorker.js) 1.48KB 0.62KB
mobile (serviceWorkerSource.js) 3.41KB 1.48KB
mobile (useBreakpoint.js) 1.54KB 0.65KB
mobile (useGesture.js) 6.96KB 1.98KB
mobile (useOfflineSync.js) 1.99KB 0.72KB
mobile (usePullToRefresh.js) 2.53KB 0.85KB
mobile (useResponsive.js) 0.72KB 0.42KB
mobile (useResponsiveConfig.js) 1.37KB 0.63KB
mobile (useSpecGesture.js) 4.32KB 1.64KB
mobile (useTouchTarget.js) 1.01KB 0.54KB
permissions (MePermissionsProvider.js) 9.53KB 3.38KB
permissions (PermissionContext.js) 0.31KB 0.25KB
permissions (PermissionGuard.js) 0.89KB 0.45KB
permissions (PermissionProvider.js) 4.64KB 1.50KB
permissions (evaluator.js) 5.12KB 1.74KB
permissions (index.js) 0.93KB 0.41KB
permissions (store.js) 0.91KB 0.42KB
permissions (useFieldPermissions.js) 1.28KB 0.53KB
permissions (usePermissions.js) 1.93KB 0.88KB
plugin-ai (index.js) 15.75KB 3.80KB
plugin-calendar (index.js) 46.85KB 12.89KB
plugin-charts (index.js) 64.66KB 18.32KB
plugin-chatbot (index.js) 190.33KB 45.10KB
plugin-dashboard (index.js) 133.43KB 34.48KB
plugin-designer (index.js) 212.80KB 43.15KB
plugin-detail (index.js) 245.29KB 62.39KB
plugin-editor (index.js) 2.46KB 1.10KB
plugin-form (index.js) 132.01KB 32.23KB
plugin-gantt (index.js) 165.16KB 40.33KB
plugin-grid (index.js) 201.51KB 54.54KB
plugin-kanban (index.js) 53.11KB 14.62KB
plugin-list (index.js) 113.01KB 27.57KB
plugin-map (index.js) 20.09KB 6.62KB
plugin-markdown (index.js) 13.72KB 4.69KB
plugin-report (index.js) 43.51KB 11.94KB
plugin-timeline (index.js) 26.44KB 7.59KB
plugin-tree (index.js) 9.26KB 3.13KB
plugin-view (index.js) 85.87KB 21.12KB
providers (DataSourceProvider.js) 0.75KB 0.39KB
providers (MetadataProvider.js) 1.37KB 0.59KB
providers (ThemeProvider.js) 1.90KB 0.85KB
providers (UploadProvider.js) 11.66KB 3.50KB
providers (index.js) 0.45KB 0.23KB
providers (types.js) 0.01KB 0.04KB
react-runtime (index.js) 5.62KB 2.34KB
react (LazyPluginLoader.js) 4.47KB 1.63KB
react (SchemaRenderer.js) 65.97KB 21.98KB
react (data-invalidation.js) 5.05KB 2.08KB
react (index.js) 2.44KB 1.21KB
react (schema-input.js) 2.32KB 1.24KB
react (spec-input.js) 0.20KB 0.18KB
sdui-parser (codegen.js) 5.41KB 2.34KB
sdui-parser (dashboard-widget-options.js) 3.08KB 1.30KB
sdui-parser (index.js) 4.93KB 2.24KB
sdui-parser (input-type.js) 2.84KB 1.40KB
sdui-parser (parse.js) 20.57KB 5.88KB
sdui-parser (provenance.js) 3.66KB 1.82KB
sdui-parser (types.js) 0.28KB 0.23KB
sdui-parser (validate.js) 10.35KB 3.60KB
types (ai.js) 0.20KB 0.17KB
types (api-types.js) 0.20KB 0.18KB
types (app.js) 2.87KB 0.99KB
types (base.js) 0.20KB 0.18KB
types (blocks.js) 0.20KB 0.18KB
types (complex.js) 2.74KB 1.41KB
types (crud.js) 0.20KB 0.18KB
types (dashboard-filter-alias.js) 6.23KB 2.74KB
types (data-display.js) 3.75KB 1.85KB
types (data-protocol.js) 0.20KB 0.19KB
types (data.js) 0.20KB 0.18KB
types (designer.js) 1.85KB 0.85KB
types (disclosure.js) 0.20KB 0.18KB
types (error-code.js) 1.54KB 0.88KB
types (feedback.js) 0.20KB 0.18KB
types (field-types.js) 0.20KB 0.18KB
types (form.js) 0.20KB 0.18KB
types (http-inflight.js) 8.87KB 3.73KB
types (http-retry.js) 4.32KB 2.02KB
types (icon-key-migration.js) 4.26KB 1.63KB
types (index.js) 4.72KB 2.24KB
types (layout.js) 0.20KB 0.18KB
types (managed-by.js) 0.19KB 0.18KB
types (mobile.js) 2.59KB 1.31KB
types (navigation.js) 0.20KB 0.18KB
types (objectql.js) 0.20KB 0.18KB
types (overlay.js) 0.20KB 0.18KB
types (permissions.js) 0.20KB 0.18KB
types (plugin-scope.js) 0.20KB 0.18KB
types (record-components.js) 0.20KB 0.19KB
types (record-semantics.js) 1.28KB 0.67KB
types (registry.js) 0.20KB 0.18KB
types (reports.js) 0.20KB 0.18KB
types (spec-report.js) 5.05KB 1.93KB
types (spec-ui-namespace.js) 0.20KB 0.19KB
types (system-fields.js) 3.33KB 1.54KB
types (theme.js) 6.28KB 2.87KB
types (ui-action.js) 3.40KB 1.71KB
types (views.js) 0.20KB 0.18KB
types (widget.js) 0.20KB 0.18KB

Size Limits

  • ✅ Core packages should be < 50KB gzipped
  • ✅ Component packages should be < 100KB gzipped
  • ⚠️ Plugin packages should be < 150KB gzipped

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants